<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkImage</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GTK+ 3 参考手册">
<link rel="up" href="DisplayWidgets.html" title="显示构件">
<link rel="prev" href="gtk3-GtkAccelLabel.html" title="GtkAccelLabel">
<link rel="next" href="gtk3-GtkLabel.html" title="GtkLabel">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gtk3-GtkAccelLabel.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="DisplayWidgets.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GTK+ 3 参考手册</th>
<td><a accesskey="n" href="gtk3-GtkLabel.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gtk3-GtkImage.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gtk3-GtkImage.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gtk3-GtkImage"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gtk3-GtkImage.top_of_page"></a>GtkImage</span></h2>
<p>GtkImage — A widget displaying an image</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gtk3-GtkImage.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gtk/gtk.h&gt;

struct              <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage">GtkImage</a>;
enum                <a class="link" href="gtk3-GtkImage.html#GtkImageType" title="enum GtkImageType">GtkImageType</a>;
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkImage.html#gtk-image-get-icon-set" title="gtk_image_get_icon_set ()">gtk_image_get_icon_set</a>              (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSet" title="GtkIconSet"><span class="type">GtkIconSet</span></a> **icon_set</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> *size</code></em>);
<a href="../gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *         <a class="link" href="gtk3-GtkImage.html#gtk-image-get-pixbuf" title="gtk_image_get_pixbuf ()">gtk_image_get_pixbuf</a>                (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkImage.html#gtk-image-get-stock" title="gtk_image_get_stock ()">gtk_image_get_stock</a>                 (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **stock_id</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> *size</code></em>);
<a href="../gdk-pixbuf/gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="returnvalue">GdkPixbufAnimation</span></a> * <a class="link" href="gtk3-GtkImage.html#gtk-image-get-animation" title="gtk_image_get_animation ()">gtk_image_get_animation</a>            (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkImage.html#gtk-image-get-icon-name" title="gtk_image_get_icon_name ()">gtk_image_get_icon_name</a>             (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>,
                                                         <em class="parameter"><code>G_CONST_RETURN <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **icon_name</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> *size</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkImage.html#gtk-image-get-gicon" title="gtk_image_get_gicon ()">gtk_image_get_gicon</a>                 (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>,
                                                         <em class="parameter"><code><a href="../gio/GIcon.html"><span class="type">GIcon</span></a> **gicon</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> *size</code></em>);
<a class="link" href="gtk3-GtkImage.html#GtkImageType" title="enum GtkImageType"><span class="returnvalue">GtkImageType</span></a>        <a class="link" href="gtk3-GtkImage.html#gtk-image-get-storage-type" title="gtk_image_get_storage_type ()">gtk_image_get_storage_type</a>          (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>);
<a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="gtk3-GtkImage.html#gtk-image-new-from-file" title="gtk_image_new_from_file ()">gtk_image_new_from_file</a>             (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>);
<a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="gtk3-GtkImage.html#gtk-image-new-from-icon-set" title="gtk_image_new_from_icon_set ()">gtk_image_new_from_icon_set</a>         (<em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSet" title="GtkIconSet"><span class="type">GtkIconSet</span></a> *icon_set</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> size</code></em>);
<a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="gtk3-GtkImage.html#gtk-image-new-from-pixbuf" title="gtk_image_new_from_pixbuf ()">gtk_image_new_from_pixbuf</a>           (<em class="parameter"><code><a href="../gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>);
<a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="gtk3-GtkImage.html#gtk-image-new-from-stock" title="gtk_image_new_from_stock ()">gtk_image_new_from_stock</a>            (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *stock_id</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> size</code></em>);
<a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="gtk3-GtkImage.html#gtk-image-new-from-animation" title="gtk_image_new_from_animation ()">gtk_image_new_from_animation</a>        (<em class="parameter"><code><a href="../gdk-pixbuf/gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a> *animation</code></em>);
<a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="gtk3-GtkImage.html#gtk-image-new-from-icon-name" title="gtk_image_new_from_icon_name ()">gtk_image_new_from_icon_name</a>        (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *icon_name</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> size</code></em>);
<a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="gtk3-GtkImage.html#gtk-image-new-from-gicon" title="gtk_image_new_from_gicon ()">gtk_image_new_from_gicon</a>            (<em class="parameter"><code><a href="../gio/GIcon.html"><span class="type">GIcon</span></a> *icon</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> size</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkImage.html#gtk-image-set-from-file" title="gtk_image_set_from_file ()">gtk_image_set_from_file</a>             (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkImage.html#gtk-image-set-from-icon-set" title="gtk_image_set_from_icon_set ()">gtk_image_set_from_icon_set</a>         (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSet" title="GtkIconSet"><span class="type">GtkIconSet</span></a> *icon_set</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> size</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkImage.html#gtk-image-set-from-pixbuf" title="gtk_image_set_from_pixbuf ()">gtk_image_set_from_pixbuf</a>           (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>,
                                                         <em class="parameter"><code><a href="../gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkImage.html#gtk-image-set-from-stock" title="gtk_image_set_from_stock ()">gtk_image_set_from_stock</a>            (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *stock_id</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> size</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkImage.html#gtk-image-set-from-animation" title="gtk_image_set_from_animation ()">gtk_image_set_from_animation</a>        (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>,
                                                         <em class="parameter"><code><a href="../gdk-pixbuf/gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a> *animation</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkImage.html#gtk-image-set-from-icon-name" title="gtk_image_set_from_icon_name ()">gtk_image_set_from_icon_name</a>        (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *icon_name</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> size</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkImage.html#gtk-image-set-from-gicon" title="gtk_image_set_from_gicon ()">gtk_image_set_from_gicon</a>            (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>,
                                                         <em class="parameter"><code><a href="../gio/GIcon.html"><span class="type">GIcon</span></a> *icon</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> size</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkImage.html#gtk-image-clear" title="gtk_image_clear ()">gtk_image_clear</a>                     (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>);
<a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="gtk3-GtkImage.html#gtk-image-new" title="gtk_image_new ()">gtk_image_new</a>                       (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkImage.html#gtk-image-set-pixel-size" title="gtk_image_set_pixel_size ()">gtk_image_set_pixel_size</a>            (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> pixel_size</code></em>);
<a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="gtk3-GtkImage.html#gtk-image-get-pixel-size" title="gtk_image_get_pixel_size ()">gtk_image_get_pixel_size</a>            (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="gtk3-GtkImage.description"></a><h2>Description</h2>
<p>
The <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> widget displays an image. Various kinds of object
can be displayed as an image; most typically, you would load a
<a href="../gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> ("pixel buffer") from a file, and then display that.
There's a convenience function to do this, <a class="link" href="gtk3-GtkImage.html#gtk-image-new-from-file" title="gtk_image_new_from_file ()"><code class="function">gtk_image_new_from_file()</code></a>,
used as follows:
</p>
<div class="informalexample"><pre class="programlisting">
  GtkWidget *image;
  image = gtk_image_new_from_file ("myfile.png");
</pre></div>
<p>
If the file isn't loaded successfully, the image will contain a
"broken image" icon similar to that used in many web browsers.
If you want to handle errors in loading the file yourself,
for example by displaying an error message, then load the image with
<a href="../gdk-pixbuf/gdk-pixbuf-File-Loading.html#gdk-pixbuf-new-from-file"><code class="function">gdk_pixbuf_new_from_file()</code></a>, then create the <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> with
<a class="link" href="gtk3-GtkImage.html#gtk-image-new-from-pixbuf" title="gtk_image_new_from_pixbuf ()"><code class="function">gtk_image_new_from_pixbuf()</code></a>.
</p>
<p>
The image file may contain an animation, if so the <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> will
display an animation (<a href="../gdk-pixbuf/gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a>) instead of a static image.
</p>
<p>
<a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> is a subclass of <a class="link" href="gtk3-GtkMisc.html#GtkMisc" title="struct GtkMisc"><span class="type">GtkMisc</span></a>, which implies that you can
align it (center, left, right) and add padding to it, using
<a class="link" href="gtk3-GtkMisc.html#GtkMisc" title="struct GtkMisc"><span class="type">GtkMisc</span></a> methods.
</p>
<p>
<a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> is a "no window" widget (has no <a href="../gdk3/gdk3-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> of its own),
so by default does not receive events. If you want to receive events
on the image, such as button clicks, place the image inside a
<a class="link" href="gtk3-GtkEventBox.html#GtkEventBox" title="struct GtkEventBox"><span class="type">GtkEventBox</span></a>, then connect to the event signals on the event box.
</p>
<div class="example">
<a name="id3321247"></a><p class="title"><b>Example 49. Handling button press events on a
<span class="structname">GtkImage</span>.</b></p>
<div class="example-contents"><pre class="programlisting">
  static gboolean
  button_press_callback (GtkWidget      *event_box,
                         GdkEventButton *event,
                         gpointer        data)
  {
    g_print ("Event box clicked at coordinates %f,%f\n",
             event-&gt;x, event-&gt;y);

    /* Returning TRUE means we handled the event, so the signal
     * emission should be stopped (don't call any further
     * callbacks that may be connected). Return FALSE
     * to continue invoking callbacks.
     */
    return TRUE;
  }

  static GtkWidget*
  create_image (void)
  {
    GtkWidget *image;
    GtkWidget *event_box;

    image = gtk_image_new_from_file ("myfile.png");

    event_box = gtk_event_box_new ();

    gtk_container_add (GTK_CONTAINER (event_box), image);

    g_signal_connect (G_OBJECT (event_box),
                      "button_press_event",
                      G_CALLBACK (button_press_callback),
                      image);

    return image;
  }
</pre></div>
</div>
<p><br class="example-break">
</p>
<p>
When handling events on the event box, keep in mind that coordinates
in the image may be different from event box coordinates due to
the alignment and padding settings on the image (see <a class="link" href="gtk3-GtkMisc.html#GtkMisc" title="struct GtkMisc"><span class="type">GtkMisc</span></a>).
The simplest way to solve this is to set the alignment to 0.0
(left/top), and set the padding to zero. Then the origin of
the image will be the same as the origin of the event box.
</p>
<p>
Sometimes an application will want to avoid depending on external data
files, such as image files. GTK+ comes with a program to avoid this,
called <span class="application">gdk-pixbuf-csource</span>. This program
allows you to convert an image into a C variable declaration, which
can then be loaded into a <a href="../gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> using
<a href="../gdk-pixbuf/gdk-pixbuf-Image-Data-in-Memory.html#gdk-pixbuf-new-from-inline"><code class="function">gdk_pixbuf_new_from_inline()</code></a>.
</p>
</div>
<div class="refsect1">
<a name="gtk3-GtkImage.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GtkImage"></a><h3>struct GtkImage</h3>
<pre class="programlisting">struct GtkImage {
  GtkMisc misc;
};
</pre>
<p>
This struct contain private data only and should be accessed by the functions
below.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkImageType"></a><h3>enum GtkImageType</h3>
<pre class="programlisting">typedef enum {
  GTK_IMAGE_EMPTY,
  GTK_IMAGE_PIXBUF,
  GTK_IMAGE_STOCK,
  GTK_IMAGE_ICON_SET,
  GTK_IMAGE_ANIMATION,
  GTK_IMAGE_ICON_NAME,
  GTK_IMAGE_GICON
} GtkImageType;
</pre>
<p>
Describes the image data representation used by a <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>. If you
want to get the image from the widget, you can only get the
currently-stored representation. e.g.  if the
<a class="link" href="gtk3-GtkImage.html#gtk-image-get-storage-type" title="gtk_image_get_storage_type ()"><code class="function">gtk_image_get_storage_type()</code></a> returns <a class="link" href="gtk3-GtkImage.html#GTK-IMAGE-PIXBUF:CAPS"><span class="type">GTK_IMAGE_PIXBUF</span></a>, then you can
call <a class="link" href="gtk3-GtkImage.html#gtk-image-get-pixbuf" title="gtk_image_get_pixbuf ()"><code class="function">gtk_image_get_pixbuf()</code></a> but not <a class="link" href="gtk3-GtkImage.html#gtk-image-get-stock" title="gtk_image_get_stock ()"><code class="function">gtk_image_get_stock()</code></a>.  For empty
images, you can request any storage type (call any of the "get"
functions), but they will all return <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> values.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GTK-IMAGE-EMPTY:CAPS"></a><span class="term"><code class="literal">GTK_IMAGE_EMPTY</code></span></p></td>
<td>there is no image displayed by the widget
</td>
</tr>
<tr>
<td><p><a name="GTK-IMAGE-PIXBUF:CAPS"></a><span class="term"><code class="literal">GTK_IMAGE_PIXBUF</code></span></p></td>
<td>the widget contains a <a href="../gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>
</td>
</tr>
<tr>
<td><p><a name="GTK-IMAGE-STOCK:CAPS"></a><span class="term"><code class="literal">GTK_IMAGE_STOCK</code></span></p></td>
<td>the widget contains a stock icon name (see
 <a class="xref" href="gtk3-Stock-Items.html" title="Stock Items"><span class="refentrytitle"><a name="gtk3-Stock-Items.top_of_page"></a>Stock Items</span>(3)</a>)
</td>
</tr>
<tr>
<td><p><a name="GTK-IMAGE-ICON-SET:CAPS"></a><span class="term"><code class="literal">GTK_IMAGE_ICON_SET</code></span></p></td>
<td>the widget contains a <a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSet" title="GtkIconSet"><span class="type">GtkIconSet</span></a>
</td>
</tr>
<tr>
<td><p><a name="GTK-IMAGE-ANIMATION:CAPS"></a><span class="term"><code class="literal">GTK_IMAGE_ANIMATION</code></span></p></td>
<td>the widget contains a <a href="../gdk-pixbuf/gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a>
</td>
</tr>
<tr>
<td><p><a name="GTK-IMAGE-ICON-NAME:CAPS"></a><span class="term"><code class="literal">GTK_IMAGE_ICON_NAME</code></span></p></td>
<td>the widget contains a named icon.
 This image type was added in GTK+ 2.6
</td>
</tr>
<tr>
<td><p><a name="GTK-IMAGE-GICON:CAPS"></a><span class="term"><code class="literal">GTK_IMAGE_GICON</code></span></p></td>
<td>the widget contains a <a href="../gio/GIcon.html"><span class="type">GIcon</span></a>.
 This image type was added in GTK+ 2.14
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-image-get-icon-set"></a><h3>gtk_image_get_icon_set ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_image_get_icon_set              (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSet" title="GtkIconSet"><span class="type">GtkIconSet</span></a> **icon_set</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> *size</code></em>);</pre>
<p>
Gets the icon set and size being displayed by the <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>.
The storage type of the image must be <a class="link" href="gtk3-GtkImage.html#GTK-IMAGE-EMPTY:CAPS"><code class="literal">GTK_IMAGE_EMPTY</code></a> or
<a class="link" href="gtk3-GtkImage.html#GTK-IMAGE-ICON-SET:CAPS"><code class="literal">GTK_IMAGE_ICON_SET</code></a> (see <a class="link" href="gtk3-GtkImage.html#gtk-image-get-storage-type" title="gtk_image_get_storage_type ()"><code class="function">gtk_image_get_storage_type()</code></a>).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>icon_set</code></em> :</span></p></td>
<td>location to store a
<a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSet" title="GtkIconSet"><span class="type">GtkIconSet</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>location to store a stock
icon size, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> int]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-image-get-pixbuf"></a><h3>gtk_image_get_pixbuf ()</h3>
<pre class="programlisting"><a href="../gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> *         gtk_image_get_pixbuf                (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>);</pre>
<p>
Gets the <a href="../gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> being displayed by the <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>.
The storage type of the image must be <a class="link" href="gtk3-GtkImage.html#GTK-IMAGE-EMPTY:CAPS"><code class="literal">GTK_IMAGE_EMPTY</code></a> or
<a class="link" href="gtk3-GtkImage.html#GTK-IMAGE-PIXBUF:CAPS"><code class="literal">GTK_IMAGE_PIXBUF</code></a> (see <a class="link" href="gtk3-GtkImage.html#gtk-image-get-storage-type" title="gtk_image_get_storage_type ()"><code class="function">gtk_image_get_storage_type()</code></a>).
The caller of this function does not own a reference to the
returned pixbuf.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the displayed pixbuf, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
the image is empty. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-image-get-stock"></a><h3>gtk_image_get_stock ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_image_get_stock                 (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **stock_id</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> *size</code></em>);</pre>
<p>
Gets the stock icon name and size being displayed by the <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>.
The storage type of the image must be <a class="link" href="gtk3-GtkImage.html#GTK-IMAGE-EMPTY:CAPS"><code class="literal">GTK_IMAGE_EMPTY</code></a> or
<a class="link" href="gtk3-GtkImage.html#GTK-IMAGE-STOCK:CAPS"><code class="literal">GTK_IMAGE_STOCK</code></a> (see <a class="link" href="gtk3-GtkImage.html#gtk-image-get-storage-type" title="gtk_image_get_storage_type ()"><code class="function">gtk_image_get_storage_type()</code></a>).
The returned string is owned by the <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> and should not
be freed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>stock_id</code></em> :</span></p></td>
<td>place to store a
stock icon name, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>place to store a stock icon
size, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> int]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-image-get-animation"></a><h3>gtk_image_get_animation ()</h3>
<pre class="programlisting"><a href="../gdk-pixbuf/gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="returnvalue">GdkPixbufAnimation</span></a> * gtk_image_get_animation            (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>);</pre>
<p>
Gets the <a href="../gdk-pixbuf/gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a> being displayed by the <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>.
The storage type of the image must be <a class="link" href="gtk3-GtkImage.html#GTK-IMAGE-EMPTY:CAPS"><code class="literal">GTK_IMAGE_EMPTY</code></a> or
<a class="link" href="gtk3-GtkImage.html#GTK-IMAGE-ANIMATION:CAPS"><code class="literal">GTK_IMAGE_ANIMATION</code></a> (see <a class="link" href="gtk3-GtkImage.html#gtk-image-get-storage-type" title="gtk_image_get_storage_type ()"><code class="function">gtk_image_get_storage_type()</code></a>).
The caller of this function does not own a reference to the
returned animation.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the displayed animation, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
the image is empty. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-image-get-icon-name"></a><h3>gtk_image_get_icon_name ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_image_get_icon_name             (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>,
                                                         <em class="parameter"><code>G_CONST_RETURN <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **icon_name</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> *size</code></em>);</pre>
<p>
Gets the icon name and size being displayed by the <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>.
The storage type of the image must be <a class="link" href="gtk3-GtkImage.html#GTK-IMAGE-EMPTY:CAPS"><code class="literal">GTK_IMAGE_EMPTY</code></a> or
<a class="link" href="gtk3-GtkImage.html#GTK-IMAGE-ICON-NAME:CAPS"><code class="literal">GTK_IMAGE_ICON_NAME</code></a> (see <a class="link" href="gtk3-GtkImage.html#gtk-image-get-storage-type" title="gtk_image_get_storage_type ()"><code class="function">gtk_image_get_storage_type()</code></a>).
The returned string is owned by the <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> and should not
be freed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>icon_name</code></em> :</span></p></td>
<td>place to store an
icon name, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>place to store an icon size,
or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> int]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-image-get-gicon"></a><h3>gtk_image_get_gicon ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_image_get_gicon                 (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>,
                                                         <em class="parameter"><code><a href="../gio/GIcon.html"><span class="type">GIcon</span></a> **gicon</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> *size</code></em>);</pre>
<p>
Gets the <a href="../gio/GIcon.html"><span class="type">GIcon</span></a> and size being displayed by the <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>.
The storage type of the image must be <a class="link" href="gtk3-GtkImage.html#GTK-IMAGE-EMPTY:CAPS"><code class="literal">GTK_IMAGE_EMPTY</code></a> or
<a class="link" href="gtk3-GtkImage.html#GTK-IMAGE-GICON:CAPS"><code class="literal">GTK_IMAGE_GICON</code></a> (see <a class="link" href="gtk3-GtkImage.html#gtk-image-get-storage-type" title="gtk_image_get_storage_type ()"><code class="function">gtk_image_get_storage_type()</code></a>).
The caller of this function does not own a reference to the
returned <a href="../gio/GIcon.html"><span class="type">GIcon</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>gicon</code></em> :</span></p></td>
<td>place to store a
<a href="../gio/GIcon.html"><span class="type">GIcon</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>place to store an icon size,
or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> int]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-image-get-storage-type"></a><h3>gtk_image_get_storage_type ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-GtkImage.html#GtkImageType" title="enum GtkImageType"><span class="returnvalue">GtkImageType</span></a>        gtk_image_get_storage_type          (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>);</pre>
<p>
Gets the type of representation being used by the <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>
to store image data. If the <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> has no image data,
the return value will be <a class="link" href="gtk3-GtkImage.html#GTK-IMAGE-EMPTY:CAPS"><code class="literal">GTK_IMAGE_EMPTY</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>image representation being used</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-image-new-from-file"></a><h3>gtk_image_new_from_file ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_image_new_from_file             (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>);</pre>
<p>
Creates a new <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> displaying the file <em class="parameter"><code>filename</code></em>. If the file
isn't found or can't be loaded, the resulting <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> will
display a "broken image" icon. This function never returns <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>,
it always returns a valid <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> widget.
</p>
<p>
If the file contains an animation, the image will contain an
animation.
</p>
<p>
If you need to detect failures to load the file, use
<a href="../gdk-pixbuf/gdk-pixbuf-File-Loading.html#gdk-pixbuf-new-from-file"><code class="function">gdk_pixbuf_new_from_file()</code></a> to load the file yourself, then create
the <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> from the pixbuf. (Or for animations, use
<a href="../gdk-pixbuf/gdk-pixbuf-Animations.html#gdk-pixbuf-animation-new-from-file"><code class="function">gdk_pixbuf_animation_new_from_file()</code></a>).
</p>
<p>
The storage type (<a class="link" href="gtk3-GtkImage.html#gtk-image-get-storage-type" title="gtk_image_get_storage_type ()"><code class="function">gtk_image_get_storage_type()</code></a>) of the returned
image is not defined, it will be whatever is appropriate for
displaying the file.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
<td>a filename. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> filename]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-image-new-from-icon-set"></a><h3>gtk_image_new_from_icon_set ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_image_new_from_icon_set         (<em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSet" title="GtkIconSet"><span class="type">GtkIconSet</span></a> *icon_set</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> size</code></em>);</pre>
<p>
Creates a <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> displaying an icon set. Sample stock sizes are
<span class="type">GTK_ICON_SIZE_MENU</span>, <span class="type">GTK_ICON_SIZE_SMALL_TOOLBAR</span>. Instead of using
this function, usually it's better to create a <a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconFactory" title="GtkIconFactory"><span class="type">GtkIconFactory</span></a>, put
your icon sets in the icon factory, add the icon factory to the
list of default factories with <a class="link" href="gtk3-Themeable-Stock-Images.html#gtk-icon-factory-add-default" title="gtk_icon_factory_add_default ()"><code class="function">gtk_icon_factory_add_default()</code></a>, and
then use <a class="link" href="gtk3-GtkImage.html#gtk-image-new-from-stock" title="gtk_image_new_from_stock ()"><code class="function">gtk_image_new_from_stock()</code></a>. This will allow themes to
override the icon you ship with your application.
</p>
<p>
The <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> does not assume a reference to the
icon set; you still need to unref it if you own references.
<a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> will add its own reference rather than adopting yours.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>icon_set</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSet" title="GtkIconSet"><span class="type">GtkIconSet</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>a stock icon size. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> int]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-image-new-from-pixbuf"></a><h3>gtk_image_new_from_pixbuf ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_image_new_from_pixbuf           (<em class="parameter"><code><a href="../gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>);</pre>
<p>
Creates a new <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> displaying <em class="parameter"><code>pixbuf</code></em>.
The <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> does not assume a reference to the
pixbuf; you still need to unref it if you own references.
<a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> will add its own reference rather than adopting yours.
</p>
<p>
Note that this function just creates an <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> from the pixbuf. The
<a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> created will not react to state changes. Should you want that, 
you should use <a class="link" href="gtk3-GtkImage.html#gtk-image-new-from-icon-set" title="gtk_image_new_from_icon_set ()"><code class="function">gtk_image_new_from_icon_set()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pixbuf</code></em> :</span></p></td>
<td>a <a href="../gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-image-new-from-stock"></a><h3>gtk_image_new_from_stock ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_image_new_from_stock            (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *stock_id</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> size</code></em>);</pre>
<p>
Creates a <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> displaying a stock icon. Sample stock icon
names are <a class="link" href="gtk3-Stock-Items.html#GTK-STOCK-OPEN:CAPS" title="GTK_STOCK_OPEN"><span class="type">GTK_STOCK_OPEN</span></a>, <a class="link" href="gtk3-Stock-Items.html#GTK-STOCK-QUIT:CAPS" title="GTK_STOCK_QUIT"><span class="type">GTK_STOCK_QUIT</span></a>. Sample stock sizes
are <span class="type">GTK_ICON_SIZE_MENU</span>, <span class="type">GTK_ICON_SIZE_SMALL_TOOLBAR</span>. If the stock
icon name isn't known, the image will be empty.
You can register your own stock icon names, see
<a class="link" href="gtk3-Themeable-Stock-Images.html#gtk-icon-factory-add-default" title="gtk_icon_factory_add_default ()"><code class="function">gtk_icon_factory_add_default()</code></a> and <a class="link" href="gtk3-Themeable-Stock-Images.html#gtk-icon-factory-add" title="gtk_icon_factory_add ()"><code class="function">gtk_icon_factory_add()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stock_id</code></em> :</span></p></td>
<td>a stock icon name</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>a stock icon size. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> int]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> displaying the stock icon</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-image-new-from-animation"></a><h3>gtk_image_new_from_animation ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_image_new_from_animation        (<em class="parameter"><code><a href="../gdk-pixbuf/gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a> *animation</code></em>);</pre>
<p>
Creates a <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> displaying the given animation.
The <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> does not assume a reference to the
animation; you still need to unref it if you own references.
<a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> will add its own reference rather than adopting yours.
</p>
<p>
Note that the animation frames are shown using a timeout with
<a href="../glib/glib-The-Main-Event-Loop.html#G-PRIORITY-DEFAULT:CAPS"><span class="type">G_PRIORITY_DEFAULT</span></a>. When using animations to indicate busyness,
keep in mind that the animation will only be shown if the main loop
is not busy with something that has a higher priority.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>animation</code></em> :</span></p></td>
<td>an animation</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> widget</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-image-new-from-icon-name"></a><h3>gtk_image_new_from_icon_name ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_image_new_from_icon_name        (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *icon_name</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> size</code></em>);</pre>
<p>
Creates a <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> displaying an icon from the current icon theme.
If the icon name isn't known, a "broken image" icon will be
displayed instead.  If the current icon theme is changed, the icon
will be updated appropriately.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>icon_name</code></em> :</span></p></td>
<td>an icon name</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>a stock icon size. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> int]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> displaying the themed icon</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-image-new-from-gicon"></a><h3>gtk_image_new_from_gicon ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_image_new_from_gicon            (<em class="parameter"><code><a href="../gio/GIcon.html"><span class="type">GIcon</span></a> *icon</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> size</code></em>);</pre>
<p>
Creates a <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> displaying an icon from the current icon theme.
If the icon name isn't known, a "broken image" icon will be
displayed instead.  If the current icon theme is changed, the icon
will be updated appropriately.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>icon</code></em> :</span></p></td>
<td>an icon</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>a stock icon size. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> int]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> displaying the themed icon</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-image-set-from-file"></a><h3>gtk_image_set_from_file ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_image_set_from_file             (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>);</pre>
<p>
See <a class="link" href="gtk3-GtkImage.html#gtk-image-new-from-file" title="gtk_image_new_from_file ()"><code class="function">gtk_image_new_from_file()</code></a> for details.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
<td>a filename or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> filename][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-image-set-from-icon-set"></a><h3>gtk_image_set_from_icon_set ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_image_set_from_icon_set         (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSet" title="GtkIconSet"><span class="type">GtkIconSet</span></a> *icon_set</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> size</code></em>);</pre>
<p>
See <a class="link" href="gtk3-GtkImage.html#gtk-image-new-from-icon-set" title="gtk_image_new_from_icon_set ()"><code class="function">gtk_image_new_from_icon_set()</code></a> for details.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>icon_set</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSet" title="GtkIconSet"><span class="type">GtkIconSet</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>a stock icon size. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> int]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-image-set-from-pixbuf"></a><h3>gtk_image_set_from_pixbuf ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_image_set_from_pixbuf           (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>,
                                                         <em class="parameter"><code><a href="../gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *pixbuf</code></em>);</pre>
<p>
See <a class="link" href="gtk3-GtkImage.html#gtk-image-new-from-pixbuf" title="gtk_image_new_from_pixbuf ()"><code class="function">gtk_image_new_from_pixbuf()</code></a> for details.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pixbuf</code></em> :</span></p></td>
<td>a <a href="../gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-image-set-from-stock"></a><h3>gtk_image_set_from_stock ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_image_set_from_stock            (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *stock_id</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> size</code></em>);</pre>
<p>
See <a class="link" href="gtk3-GtkImage.html#gtk-image-new-from-stock" title="gtk_image_new_from_stock ()"><code class="function">gtk_image_new_from_stock()</code></a> for details.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>stock_id</code></em> :</span></p></td>
<td>a stock icon name</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>a stock icon size. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> int]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-image-set-from-animation"></a><h3>gtk_image_set_from_animation ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_image_set_from_animation        (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>,
                                                         <em class="parameter"><code><a href="../gdk-pixbuf/gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a> *animation</code></em>);</pre>
<p>
Causes the <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> to display the given animation (or display
nothing, if you set the animation to <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>animation</code></em> :</span></p></td>
<td>the <a href="../gdk-pixbuf/gdk-pixbuf-Animations.html#GdkPixbufAnimation"><span class="type">GdkPixbufAnimation</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-image-set-from-icon-name"></a><h3>gtk_image_set_from_icon_name ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_image_set_from_icon_name        (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>,
                                                         <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *icon_name</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> size</code></em>);</pre>
<p>
See <a class="link" href="gtk3-GtkImage.html#gtk-image-new-from-icon-name" title="gtk_image_new_from_icon_name ()"><code class="function">gtk_image_new_from_icon_name()</code></a> for details.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>icon_name</code></em> :</span></p></td>
<td>an icon name</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>an icon size. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> int]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-image-set-from-gicon"></a><h3>gtk_image_set_from_gicon ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_image_set_from_gicon            (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>,
                                                         <em class="parameter"><code><a href="../gio/GIcon.html"><span class="type">GIcon</span></a> *icon</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Themeable-Stock-Images.html#GtkIconSize" title="enum GtkIconSize"><span class="type">GtkIconSize</span></a> size</code></em>);</pre>
<p>
See <a class="link" href="gtk3-GtkImage.html#gtk-image-new-from-gicon" title="gtk_image_new_from_gicon ()"><code class="function">gtk_image_new_from_gicon()</code></a> for details.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>icon</code></em> :</span></p></td>
<td>an icon</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>an icon size. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> int]</span>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-image-clear"></a><h3>gtk_image_clear ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_image_clear                     (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>);</pre>
<p>
Resets the image to be empty.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.8</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-image-new"></a><h3>gtk_image_new ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_image_new                       (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Creates a new empty <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> widget.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a newly created <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> widget.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-image-set-pixel-size"></a><h3>gtk_image_set_pixel_size ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_image_set_pixel_size            (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> pixel_size</code></em>);</pre>
<p>
Sets the pixel size to use for named icons. If the pixel size is set
to a value != -1, it is used instead of the icon size set by
<a class="link" href="gtk3-GtkImage.html#gtk-image-set-from-icon-name" title="gtk_image_set_from_icon_name ()"><code class="function">gtk_image_set_from_icon_name()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pixel_size</code></em> :</span></p></td>
<td>the new pixel size</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-image-get-pixel-size"></a><h3>gtk_image_get_pixel_size ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gtk_image_get_pixel_size            (<em class="parameter"><code><a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a> *image</code></em>);</pre>
<p>
Gets the pixel size used for named icons.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkImage.html#GtkImage" title="struct GtkImage"><span class="type">GtkImage</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the pixel size used for named icons.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
</div>
<div class="refsect1">
<a name="gtk3-GtkImage.see-also"></a><h2>See Also</h2>
<a href="../gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>